import request from "@/utils/request";

// 查询工序管理列表
export function listProcedure(query) {
  return request({
    url: "tech/procedure/list",
    method: "get",
    params: query,
  });
}

// 查询工序管理详细
export function getProcedure(id) {
  return request({
    url: "tech/procedure/" + id,
    method: "get",
  });
}

// 新增工序管理
export function addProcedure(data) {
  return request({
    url: "tech/procedure",
    method: "post",
    data: data,
  });
}

// 修改工序管理
export function updateProcedure(data) {
  return request({
    url: "tech/procedure",
    method: "put",
    data: data,
  });
}

// 删除工序管理
export function delProcedure(id) {
  return request({
    url: "tech/procedure/" + id,
    method: "delete",
  });
}
// 二级工序岗位管理
export function addStation(data) {
  return request({
    url: "tech/workProcedureStation/add",
    method: "post",
    data
  });
}
// 删除二级工序岗位管理
export function delStation(id) {
  return request({
    url: `tech/workProcedureStation/${id}`,
    method: "delete",
  });
}
// 二级工序设备管理
export function addType(data) {
  return request({
    url: "tech/workProcedureType/add",
    method: "post",
    data
  });
}
// 删除二级工序设备管理
export function delType(id) {
  return request({
    url: `tech/workProcedureType/${id}`,
    method: "delete",
  });
}
